﻿@model IEnumerable<Capacitacion.Models.Restaurant>
@{
    ViewBag.Title = "Restaurants";
}
<h2>Restaurants</h2>
@using (Html.BeginForm("Index", "Restaurant", FormMethod.Get))
{
    <div>
        @ViewBag.MSG
        @Html.DropDownList("state", new SelectList(ViewBag.States), "All")
        <input type="submit" value="Go!" />
    </div>
}
<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Name
        </th>
        <th>
            Address
        </th>
    </tr>
    @foreach (var item in Model)
    {
        @Html.Partial("_Restaurant", item)
    }
</table>
<p>
    @Html.ActionLink("Back to Home Page", "Index", "Home")
</p>
